<template>
	<div class="pub-mask">
		<div class="pub-mask-content">
			<div class="title" v-if="title">
				{{ title }}
				<image @click="$emit('close')" class="close" src="https://static.inclusionconf.com/static/images/chat/pub-close.png" mode="widthFix"></image>
			</div>
			<slot></slot>
		</div>
	</div>
</template>

<script>
	export default {
		name: "pub-mask",
		props: {
			value: {
				type: Boolean,
				default: false,
			},
			title: {
				type: String,
				default: ''
			}
		},
	};
</script>

<style lang="less" scoped>
	.pub-mask {
		position: fixed;
		left: 0;
		top: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0, 6, 50, 0.4);
		z-index: 10;
		display: flex;
		align-items: center;
		justify-content: center;
		overflow: hidden;

		.pub-mask-content {
			width: 678rpx;
			background: #ffffff;
			border-radius: 14px;

			.title {
				width: 100%;
				height: 50px;
				background: #7350F5;
				border-radius: 14px 14px 0px 0px;
				font-family: AlibabaPuHuiTi_3_65_Medium;
				font-size: 18px;
				color: #FFFFFF;
				line-height: 18px;
				text-align: center;
				font-style: normal;
				display: flex;
				align-items: center;
				justify-content: center;
				position: relative;
				
				.close {
					position: absolute;
					right: 10px;
					top: 10px;
					width: 30px;
				}
			}

			.content {
				flex: 1;
				overflow: auto;
				width: 100%;
			}
		}
	}
</style>